<template>
  <div class="container contract-review pb70">
    <p class="bread">
      <a href="#/personalcenter">个人中心</a> >
      <a href="#/personalcenter/law" class="font-s-18">订单管理</a> >
      <a href="javascript:void(0);" class="font-s-16">法律服务</a>
    </p>
    <div class="bg-c-fff box-border">
      <h3 class="tm-title">法律服务</h3>
      <step :stepData="stepData" :stepNum="stepNum" @stepRouter="stepRouter"></step>
    </div>
    <div class="content">
      <div class="box bg-c-fff box-border">
        <img src="../assets/sh.png" alt="" class="db auto">
        <p class="tc">监控员正在绘制流程图，请耐心等待。
          <br>流程图绘制成功后，自动进入法律服务监控阶段。</p>
      </div>
    </div>
  </div>
</template>
<script type="text/javascript">
import Step from '../components/Step'
export default {
  components: {
    Step
  },
  data() {
    return {
      stepNum: 1,
      stepData: [{
        name: '确认付款'
      }, {
        name: '监控员绘制流程图'
      }, {
        name: '法律服务监控'
      }, {
        name: '服务评价'
      }],
      status: ''
    }
  },
  mounted() {
    this.$http.get('/legalService/read/detail', {
      params: {
        id: this.$route.query.id
      }
    }).then(data => {
      if (data.data.httpCode === 200) {
        this.status = data.data.data.status
      } else {
        this.$toasted.show(data.data.msg)
      }
    }).catch(err => {
      console.log(err)
      this.$toasted.show('网络出错')
    })
  },
  methods: {
    stepRouter(i, name) {
      if (i === 0 && this.status >= 1) {
        this.$router.push('/law-service-pay?id=' + this.$route.query.id)
      }
      if (i === 1 && this.status >= 2) {
        this.$router.push('/law-service-chart?id=' + this.$route.query.id)
      }
      if (i === 2 && this.status >= 3) {
        this.$router.push('/law-service-monitor?id=' + this.$route.query.id)
      }
      if (i === 3 && this.status >= 4) {
        this.$router.push('/law-service-evalua?id=' + this.$route.query.id)
      }
    }
  }
}

</script>
<style type="text/css" scoped>
.box-border {
  border: 1px solid #ddd;
}

.tm-title {
  line-height: 40px;
  padding-left: 35px;
  font-size: 14px;
  color: #282828;
  border-bottom: 1px solid #ddd;
}

.content .box {
  margin-top: 20px;
  padding: 80px 0;
}

.content .box p {
  margin-top: 30px;
  color: #666;
  line-height: 30px;
}






























































/*

.white-button,
.blue-button {
  width: 245px;
  height: 40px;
  line-height: 40px;
  text-align: center;
  margin: 25px 5px 45px 5px;
}

.file-box {
  height: 300px;
  width: 600px;
  margin-top: 40px;
  padding-top: 125px;
}

.state {
  line-height: 35px;
}*/

</style>
